package com.mt.api.modules.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.api.modules.domain.AppOrder;
import com.mt.api.modules.domain.bo.AppOrderListBo;
import com.mt.api.modules.domain.dto.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @Author: plover
 * @Date: 2020/07/07/4:37 下午
 * @Description:
 */
public interface AppOrderMapper extends BaseMapper<AppOrder> {

    List<AppOrder> getOrderPage(Page page, @Param("param") AppOrderListBo param);

    List<OrderCustomerCountDto> getOrderCustomerCount(@Param("lastDayNum") int lastDayNum);

    List<OrderCargoCountDto> getOrderCargoCount(@Param("lastDayNum") int lastDayNum);

    int plusOutStoreQty(@Param("id") Integer id, @Param("outStoreQty") Integer outStoreQty, @Param("status") Integer status, @Param("finishTime") Date finishTime);

    int subtractOutStoreQty(@Param("id") Integer id, @Param("outStoreQty") Integer outStoreQty, @Param("status") Integer status);
}
